<template>
  <el-dialog
    title="审核"
    :visible="reviewDialogVisible"
    center
    destroy-on-close
  >
    <div class="blog-review-container">
      <el-form model="form">
        <el-form-item label="审核意见">
          <el-select v-model="form.status" placeholder="请选择状态">
            <el-option label="审核不通过" value="1">审核不通过</el-option>
            <el-option label="审核通过" value="2">审核通过</el-option>
          </el-select>
        </el-form-item>
        <el-form-item v-show="form.status===1" label="审核回复">
          <textarea placeholder="请输入回复内容" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">确定</el-button>
          <el-button @click="onCancel">取消</el-button>
        </el-form-item>
      </el-form>
    </div>
  </el-dialog>

</template>

<script>
export default {
  name: 'BlogReview',
  data() {
    return {
      form: {}
    }
  },
  methods: {
    onCancel() {
      this.$emit('update:reviewDialogVisible', false)
    },
    onSubmit(e) {
      console.log(this.form)
      this.onCancel()
    //   this.updateAttr(this.form).then(res => {
    //     if (res.code === 200) {
    //       this.$message.success(res.message)
    //       this.$router.replace('/travel/index')
    //       this.onCancel()
    //     } else {
    //       this.message.error(res.message)
    //     }
    //   })
    }
  }
}
</script>

<style lang="less" scoped>

</style>
